package com.woniuxy.movice.service.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.woniuxy.movice.dto.Page;
import com.woniuxy.movice.entity.Movie;
import com.woniuxy.movice.mapper.MovieMapper;
import com.woniuxy.movice.service.MovieService;

import lombok.Data;

@Data
@Service
public class MovieServiceImp implements MovieService{
	
	@Resource
	private MovieMapper movieMapper;

	@Override
	public int findMovieNum() {
		return movieMapper.findMovieNum();
	}

	@Override
	public List<Movie> findMovieByPage(Page<Movie> page) {
		return movieMapper.findMovieByPage(page);
	}

	@Override
	public Movie showMovieById(int id) {
		return movieMapper.showMovieById(id);
	}

	@Override
	public List<Movie> showTenMovie() {
		return movieMapper.showTenMovie();
	}

	@Override
	public List<Movie> findMovieByType(Page<Movie> page) {
		return movieMapper.findMovieByType(page);
	}

	@Override
	public int findMovieNumByType(String mtype) {
		return movieMapper.findMovieNumByType(mtype);
	}

	@Override
	public Movie findMovieByMid(Integer mid) {
		return movieMapper.findMovieByMid(mid);
	}

}
